#include "comm.hpp"
#include "Fifo.hpp"
int main()
{
    Shm shm(pathname, projid, CREATER);
    shm.Attr();

    NAMEFIFO fifo(PATH, FILENAME);
    
    Fileopen readerfile(PATH, FILENAME);
    readerfile.openForRead();
    char *mem = (char *)shm.VirtualAddr();
    while (true)
    {
        if (readerfile.Wait())
        {
            printf("%s\n", mem);
        }
        else
            break;
    }
    readerfile.Close();
    std::cout << "server end normal!" << std::endl; // server段的析构函数没有被成功调用！
    return 0;
}